<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang='en'>
<head>
	<meta charset='utf-8' />
	<title>广溢信息技术有限公司</title>
	<meta content='' name='description' />
	<meta content='' name='author' />
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<!-- Bootstrap -->
	<link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet" >
    <link href="__PUBLIC__/css/jquery-ui-1.9.2.custom.css" rel="stylesheet" />
	<link href="__PUBLIC__/css/font-awesome.min.css" rel="stylesheet" >

	<!--[if IE 7]>
		<link  href="__PUBLIC__/css/font-awesome-ie7.min.css" rel="stylesheet">
	<![endif]-->

	<!--[if lt IE 9]>
		<link type="text/css" href="__PUBLIC__/css/custom-theme/jquery.ui.1.9.2.ie.css"  rel="stylesheet" />
	<![endif]-->

	<link href="__PUBLIC__/css/bootstrap-responsive.css" rel="stylesheet">
	<link href="__PUBLIC__/css/test.css" rel="stylesheet">
	<script src="__PUBLIC__/js/jquery.js"></script>

	<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
	<!--[if lt IE 9]>
	<script src="__PUBLIC__/js/html5shiv.js"></script>
	<script src="__PUBLIC__/js/respond.min.js"></script>
	<![endif]-->
	<script type="text/javascript">
	var upload_url="<?php echo U('file/upload?module='.MODULE_NAME);?>";
	var del_url="<?php echo U('File/del');?>";
	var session_id="<?php echo session_id();?>";	
	var _hmt = _hmt || [];
	(function() {
	  var hm = document.createElement("script");
	  hm.src = "//hm.baidu.com/hm.js?2a935166b0c9b73fef3c8bae58b95fe4";
	  var s = document.getElementsByTagName("script")[0]; 
	  s.parentNode.insertBefore(hm, s);
	})();
</script>
</head>
<body>
	<div class="shade"></div>
	<div class="row-fluid navbar visible-phone">
	<div class="row-fluid">
		<a class="brand" href="<?php echo U('home/index');?>">广溢网络</a>
		<a data-toggle="collapse" data-target="#top_menu" class="right">
		<i class="brand icon-th-list"></i>
		</a>
	</div>
	<div class="col-lapse" id="top_menu">
		<ul class="nav nav-pills">
			<?php if(is_array($list_top_menu)): $i = 0; $__LIST__ = $list_top_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$tag): $mod = ($i % 6 );++$i;?><li>
					<a  href="#" url="<?php echo U($tag['url']);?>" node="<?php echo ($tag["id"]); ?>" onclick="click_top_menu(this)"><?php echo ($tag["name"]); ?></a>
				</li><?php endforeach; endif; else: echo "" ;endif; ?>
		</ul>
	</div>
</div>
<div class="row-fluid navbar hidden-phone">
	<a class="brand" href="<?php echo U('home/index');?>">广溢网络</a>
	<ul class="nav nav-pills">
		<?php if(is_array($list_top_menu)): $i = 0; $__LIST__ = $list_top_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$tag): $mod = ($i % 6 );++$i;?><li>
				<a  href="#" url="<?php echo U($tag['url']);?>" node="<?php echo ($tag["id"]); ?>" onclick="click_top_menu(this)"><?php echo ($tag["name"]); ?></a>
			</li><?php endforeach; endif; else: echo "" ;endif; ?>
	</ul>
	<aside>
		<span>
			<a href="<?php echo U('UserConfig/index');?>">设置</a>
		</span>
		<span>
			<a href="<?php echo U('profile/index');?>"><?php echo (session('user_name')); ?></a>
		</span>
		<span>
			<a href="<?php echo U('login/logout');?>">退出</a>
		</span>
		&nbsp;&nbsp;
	</aside>
</div>

	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span2 left_menu">
				<div class="visible-phone">
	<h4 class="btn no-border" data-toggle="collapse" data-target="#left_menu">		
			<?php echo ($top_menu_name); ?><i class="icon-angle-down"></i>
		</h4>
	<div class="col-lapse" id="left_menu"><?php echo ($html_left_menu); ?></div>
</div>
<div class="hidden-phone">
	<h4><?php echo ($top_menu_name); ?></h4>
	<div><?php echo ($html_left_menu); ?></div>
</div>
			</div>
			<div class="span10 content">

<!--<link href="__PUBLIC__/js_selectors/alpha.css" rel="stylesheet" >-->
<!--<link href="__PUBLIC__/js_selectors/css.css" rel="stylesheet" >-->
<!--<script src="__PUBLIC__/js_selectors/drag.js"></script>-->
<script src="__PUBLIC__/js_selectors/industry_arr.js"></script>
<!--<script src="__PUBLIC__/js_selectors/industry_func.js"></script>-->
<script src="__PUBLIC__/js/areaJson.js"></script>
<script src="__PUBLIC__/js/json2select.min.js"></script>
<!--<script type="text/javascript src="/Public/js/areaJson.js"></script>-->
<!--<script type="text/javascript src="/Public/js/json2select.min.js"></script>-->
<script type="text/javascript">
  $(document).ready(function(){
      $("#district_select").json2select(areaJson,["河南省","南阳市","卧龙区"]);
      })
	function save() {
		if(check_form("form_data")){
			sendForm("form_data", "<?php echo U('save');?>","__URL__");
		}
	}
function IndustrySelect_2(da){
  winopen('/index.php?s=/mini_kehu/add?industry=1',600,400);
}
	function chaxun(search_txt) {
    if(search_txt == ''){
      alert('名称不能为空');
      return;
    }
    //var search_txt = search_txt;
    winopen("/index.php?s=/kehu/index/search_txt/"+search_txt, 600, 400);
	}
	</script>
<div class="customer">
	<div class="row-fluid title">
		<span>
			<nobr>添加客户</nobr>
		</span>
	</div>
	<form method='post' id="form_data">
		<input type="hidden" name="opmode" value="add">
		<input type="hidden" name="ajax" id="ajax" value="1">
		<div class="row-fluid form_box">
			<div class="row-fluid form-horizontal">
        <div class="control-group span6">
          <label class="control-label" for="name">客户性质*：</label>
          <div class="controls">
            <select type="select-one" id="nature_id" name="nature_id" onchange="" ondblclick="" class="medium" ><option value="" >选择客户性质</option><?php  foreach($nature_list as $key=>$val) { ?><option value="<?php echo $key ?>"><?php echo $val ?></option><?php } ?></select>
          </div>
        </div>
        <div class="control-group span6">
          <label class="control-label" for="name">客户分类*：</label>
          <div class="controls">
            <select type="select-one" id="grade_id" name="grade_id" onchange="" ondblclick="" class="medium" ><option value="" >选择客户分类</option><?php  foreach($grade_list as $key=>$val) { ?><option value="<?php echo $key ?>"><?php echo $val ?></option><?php } ?></select>
          </div>
        </div>
      </div>
			<div class="row-fluid form-horizontal">
        <div class="control-group span6">
          <label class="control-label" for="name">客户来源*：</label>
          <div class="controls">
            <select type="select-one" id="origin_id" name="origin_id" onchange="" ondblclick="" class="medium" ><option value="" >选择客户来源</option><?php  foreach($origin_list as $key=>$val) { ?><option value="<?php echo $key ?>"><?php echo $val ?></option><?php } ?></select>
          </div>
        </div>
        <div class="control-group span6">
          <label class="control-label" for="name">客户公海*：</label>
          <div class="controls">
            <select type="select-one" id="public_store_id" name="public_store_id" onchange="" ondblclick="" class="medium" ><option value="" >选择客户公海</option><?php  foreach($public_store_list as $key=>$val) { ?><option value="<?php echo $key ?>"><?php echo $val ?></option><?php } ?></select>
          </div>
        </div>
      </div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="name">客户名称*：</label>
					<div class="controls">
            <input type="text" id="name" name="name"  check="require" msg="请输入名称" />
            <button type="button" class="btn" onclick="chaxun($(this).prev('input').val())">查询</button>
          </div>
				</div>
				<div class="control-group span6">
					<label class="control-label" for="short">客户网址*：</label>
					<div class="controls">
            <input type="text" id="web_url" name="web_url" msg="请输入客户网址" />
          </div>
				</div>
			</div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="salesman">行业：</label>
					<div class="controls">
            <input id="btn_IndustryID_2" type="text" value="" onclick="IndustrySelect_2(this)" name="trade">
          </div>
						<!--<input type="text" id="salesman" name="salesman" ></div>-->
				</div>
			</div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span12">
					<label class="control-label" for="biz_license">客户地区*：</label>
					<div class="controls">
            <DIV id="district_select"></div>
          </div>
				</div>
			</div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span12">
					<!--<label class="control-label" for="address">客户地址*:</label>-->
					<label class="control-label" for="address">客户地址*：</label>
					<div class="controls">
            <input type="text" id="address" name="address" style="width:740px;">
          </div>
				</div>
      </div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="contact">联系人*：</label>
					<div class="controls">
						<input type="text" id="contact" name="contact"  check="require" msg="请输入联系人"></div>
				</div>
				<div class="control-group span6">
					<label class="control-label" for="mobile">手机*：</label>
					<div class="controls">
            <input type="text" id="mobile" name="mobile"  check="require" msg="请输入手机号码" >
            <button type="button" class="btn" onclick="chaxun($(this).prev('input').val())">查询</button>
          </div>
				</div>
			</div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="tel">电话：</label>
					<div class="controls">
						<input type="text" id="tel" name="tel" msg="请输入办公电话"></div>
				</div>
				<div class="control-group span6">
					<label class="control-label" for="fax">传真：</label>
					<div class="controls">
						<input type="text" id="fax" name="fax" ></div>
				</div>
			</div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="qq">qq：</label>
					<div class="controls">
						<input type="text" id="qq" name="qq"></div>
				</div>
				<div class="control-group span6">
					<label class="control-label" for="email">邮箱：</label>
					<div class="controls">
						<input type="text" id="email" name="email" ></div>
				</div>
			</div>

			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="legal_person">企业法人：</label>
					<div class="controls">
						<input type="text" id="legal_person" name="legal_person"></div>
				</div>
				<div class="control-group span6">
					<label class="control-label" for="fund">注册资金：</label>
					<div class="controls">
						<input type="text" id="fund" name="fund" ></div>
				</div>
			</div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="fund_date">成立日期：</label>
					<div class="controls">
						<input type="text" id="fund_date" name="fund_date"></div>
				</div>
				<div class="control-group span6">
					<label class="control-label" for="main_business">主营业务：</label>
					<div class="controls">
						<input type="text" id="main_business" name="main_business" ></div>
				</div>
			</div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="main_client_base">主要客户群：</label>
					<div class="controls">
						<input type="text" id="main_client_base" name="main_client_base"></div>
				</div>
				<div class="control-group span6">
					<label class="control-label" for="business_rang">营业范围：</label>
					<div class="controls">
						<input type="text" id="business_rang" name="business_rang" ></div>
				</div>
			</div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="business_area">营业区域：</label>
					<div class="controls">
						<input type="text" id="business_area" name="business_area"></div>
				</div>
				<div class="control-group span6">
					<label class="control-label" for="net_spread">网络推广情况：</label>
					<div class="controls">
						<input type="text" id="net_spread" name="net_spread" ></div>
				</div>
			</div>

			<div class="row-fluid form-horizontal">
				<div class="control-group">
					<label class="control-label" for="description">备注：</label>
					<div class="controls">
						<textarea  name="description" rows="5" class="span10"></textarea>
					</div>
				</div>
      </div>
			<div class="row-fluid form-horizontal">
				<div class="action span3" style="margin: 0 auto;float:none;">
					<input class="btn default" type="button" value="保存" onclick="save();">
          <input  class="btn" type="button" value="取消" onclick="go_return_url();">
        </div>
			</form>
		</div>
	</div>
</div>
</div>
		</div>
	</div>
	<div class="msg popout"></div>
	<iframe src="<?php echo U('push/client');?>" class="push" id="push"></iframe>
	<script src="__PUBLIC__/js/bootstrap.min.js"></script>
	<script src="__PUBLIC__/js/jquery-ui-1.9.2.custom.min.js"></script>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>